<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<script type="text/javascript">

$(document).ready(function(){
	$("ul li:eq(3)").addClass("active");
	$('.datatable').dataTable( {        				
		 "oLanguage": {
				"sUrl": "/DormManage/media/zh_CN.json"
		 },
		"bLengthChange": false, //改变每页显示数据数量
		"bFilter": false, //过滤功能
		"aoColumns": [
			null,
			null,
			null,
			{ "asSorting": [ ] },
			null,
			{ "asSorting": [ ] },
		]
	});
});

</script>
<style type="text/css">
	.span6 {
		width:0px;
		height: 0px;
		padding-top: 0px;
		padding-bottom: 0px;
		margin-top: 0px;
		margin-bottom: 0px;
	}

</style>
<div class="data_list">
		<div class="data_list_title">
			报修管理
		</div>
		<br>
<button class="btn btn-success" type="button" style="margin-right: 50px;" onclick="javascript:window.location='repair?action=set&name=${name }&id=${id }&room=${room }'">报修添加</button>
		
		<div >
		<br>
			<table class="table table-striped table-bordered table-hover datatable"  >
				<thead>
					<tr>
					
					<th width="18%">日期</th>
					<th>联系人</th>
					<th>联系方式</th>
					<th>寝室号</th>
					<th>报修内容</th>
					<th>处理状态</th>
					
				</tr>
				</thead>
				<tbody>
				<c:forEach  varStatus="i" var="repairList" items="${repairList }">
					
			<c:if test="${repairList.end==0}">
					<tr>
				
						<td>${repairList.date}</td>
						<td>${repairList.name }</td>
						<td>${repairList.tel }</td>
						<td>${repairList.buildid }#${repairList.room }</td>
						<td>${repairList.content }</td>
						
						<td id="temp">  
						<font color="red">
						
 				 			  <c:out value="未处理"/>
 				 			  
											</font>
											

						
					</tr></c:if>
				</c:forEach>
				</tbody>
				
				<tbody>
				<c:forEach  varStatus="i" var="repairList" items="${repairList }">
					
			<c:if test="${repairList.end==1}">
					<tr>
				
						<td>${repairList.date}</td>
						<td>${repairList.name }</td>
						<td>${repairList.tel }</td>
						<td>${repairList.buildid }#${repairList.room }</td>
						<td>${repairList.content }</td>
						
						<td id="temp">  
						<font color="pink">
						
 				 			  <c:out value="已处理"/>
 				 			  
											</font>
											

						
					</tr></c:if>
				</c:forEach>
				</tbody>
				
			</table>
		</div>
		<div align="center"><font color="red">${error }</font></div>
</div>